package com.suineg.pms.entity.commons;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.google.common.collect.Lists;
import com.suineg.pms.entity.IdEntity;
import com.suineg.pms.entity.fee.FeeScal;

/**
 *系统参数信息实体
 *@author Suine
 */
@Entity
@Table(name = "sys_system_info")
public class SystemInfo extends IdEntity{
	/** 标识号 */
	private String code;
	/** 显示  */
	private String name;
	/** 备注 */
	private String memo;
	/** 参数 标识 */
	private SystemParameter parameter;
	
	/** 交费基准 */
	private List<FeeScal> feeScaleList = Lists.newArrayList();
	@OneToMany(fetch = FetchType.LAZY,mappedBy = "type")
	public List<FeeScal> getFeeScaleList() {
		return feeScaleList;
	}

	public void setFeeScaleList(List<FeeScal> feeScaleList) {
		this.feeScaleList = feeScaleList;
	}

	public SystemInfo(Long id){
		this.id = id;
	}
	
	public SystemInfo() {
		super();
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "param_id")
	public SystemParameter getParameter() {
		return parameter;
	}
	public void setParameter(SystemParameter parameter) {
		this.parameter = parameter;
	}

}

